<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-roomUser-add">

        <div class="form-group">
            <label class="col-sm-3 control-label">登陆名（手机号）：</label>
            <div class="col-sm-8">
                <input id="phone" name="phone" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">昵称：</label>
            <div class="col-sm-8">
                <input id="nickName" name="nickName" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">用户类型：</label>
            <div class="col-sm-8">
                <select name="userType"  class="form-control m-b" id="userType">
                    <option value="2" >机器人</option>
                    <option value="0" >普通用户</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">机器人类型：</label>
            <div class="col-sm-8">
                <select name="robotType" class="form-control m-b" id="robotType">
                    <option value="1" >抢包</option>
                    <option value="2" >发包</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">是否避雷：</label>
            <div class="col-sm-8">
                <select name="leiType" class="form-control m-b" id="leiType">
                    <option value="0" >不避雷</option>
                    <option value="1" >避雷</option>
                </select>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label">头像：</label>
            <div class="col-sm-8">
                <div class="uploder-container" imgType="user" fileNum="1">
                    <div  class="cxuploder" >
                        <div class="queueList">
                            <input id="headImg" name="headImg" type="hidden"  />
                            <div class="placeholder">
                                <div class="filePicker"></div>
                                <p>将照片拖到这里</p>
                            </div>
                        </div>

                        <div class="statusBar" style="display:none;">
                            <div class="btns">
                                <!--去除只能添加一张-->
                                <!--<div class="jxfilePicker"></div>-->
                            </div>
                            <div class="info"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </form>
</div>
<div th:include="include::footer"></div>
<div th:include="tool/upload/webuploader :: webuploader"></div>
<script th:src="@{/ajax/libs/select/select2.js}"></script>

<script type="text/javascript">
    var prefix = ctx + "module/roomUser"
    $("#form-roomUser-add").validate({
        rules: {
            xxxx: {
                required: true,
            },
        }
    });

    function submitHandler() {
        if ($.validate.form()) {
            //图片
            var headImg = getImgList(0);
            $("#headImg").val(headImg);
            $.operate.save(prefix + "/add", $('#form-roomUser-add').serialize());
        }
    }
</script>
</body>
</html>
